package cn.iocoder.yudao.module.product.enums.spu;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 币种
 *
 * @author lizhongwen
 */
@Getter
@AllArgsConstructor
public enum CurrencyUnitEnum {
    CNY("CNY", "人民币"),
    AUD("AUD", "澳元"),
    USD("USD", "美元"),
    EUR("EUR", "欧元"),
    KWD("KWD", "科威特第纳尔"),
    MXN("MXN", "墨西哥比索"),
    KRW("KRW", "韩元"),
    MAD("MAD", "摩洛哥迪拉姆"),
    JPY("JPY", "日元"),
    NZD("NZD", "新西兰元"),
    NOK("NOK", "挪威克朗"),
    PHP("PHP", "菲律宾比索"),
    PLN("PLN", "波兰兹罗提"),
    MYR("MYR", "马来西亚林吉特"),
    HKD("HKD", "港币"),
    HUF("HUF", "匈牙利福林"),
    GBP("GBP", "英镑"),
    INR("INR", "印度卢比"),
    IDR("IDR", "印尼盾"),
    VND("VND", "越南盾"),
    ZAR("ZAR", "南非兰特"),
    RON("RON", "罗马尼亚列伊"),
    SAR("SAR", "沙特里亚尔"),
    QAR("QAR", "卡塔尔里亚尔"),
    SEK("SEK", "瑞典克朗"),
    TWD("TWD", "新台币"),
    TRY("TRY", "土耳其里拉"),
    SGD("SGD", "新加坡元"),
    THB("THB", "泰铢"),
    BRL("BRL", "巴西雷亚尔"),
    CAD("CAD", "加拿大元"),
    BHD("BHD", "巴林第纳尔"),
    CHF("CHF", "瑞士法郎"),
    COP("COP", "哥伦比亚比索"),
    CZK("CZK", "捷克克朗"),
    AED("AED", "阿联酋迪拉姆"),
    DKK("DKK", "丹麦克朗"),
    PEN("PEN", "秘鲁新索尔"),
    CLP("CLP", "智利比索"),
    JOD("JOD", "约旦第纳尔"),
    EGP("EGP", "埃及镑"),
    RUB("RUB", "俄罗斯卢布"),
    ARS("ARS", "阿根廷比索");

    /**
     * 值
     */
    private final String value;

    /**
     * 描述
     */
    private final String desc;

    public static CurrencyUnitEnum fromValue(String value) {
        for (CurrencyUnitEnum item : values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        throw new IllegalArgumentException("枚举类型 CurrencyUnitEnum 不支持的值：" + value);
    }
}